@import './normalize.css';
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Montserrat:wght@100;200;300;400;500;600;700&family=Old+Standard+TT:wght@400;700&display=swap');

:root {
    --white: #ffffff;
    --gray-98: #F7F8FA;
    --gray-97: #F5F6F7;
    --gray-95: #EDEFF2;
    --gray-70: #7D8FB3;
    --gray-60: #6B7A99;
    --gray-50: #4D5E80;
    --purple: #83F;
    --blue: #3361FF;
    --yellow: #FFCB33;
    --bronze: #CC7429;
}

html {
    height: 100%;
    font-family: Montserrat;
    color: var(--gray-70);
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    height: 100%;
    margin: 0;
    background-color: var(--gray-98);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--gray-50);
}

h1 {
    font-weight: 200;
}

[class*="sort-container"] {
    max-width: 1290px;
    padding: 0 15px;
    margin: 0 auto;
}

@media(max-width:1400px) {
    [class*="sort-container"] {
        max-width: 1110px;
    }
}

@media(max-width:1200px) {
    [class*="sort-container"] {
        max-width: 930px;
    }
}

@media(max-width:576px) {
    [class*="sort-container"] {
        max-width: none;
    }
}

label {
    display: inline-block;
}

input, textarea, select {
    font-family: Montserrat;
    border-radius: 15px;
    box-shadow: 0px 2px 5px 0px rgba(38, 51, 77, 0.03);
    transition: box-shadow 0.1s cubic-bezier(.79,.21,.06,.81), opacity 0.1s cubic-bezier(.79,.21,.06,.81);
}

input, textarea {
    padding: 10px 20px;
    margin: 0;
    outline: none;
    border: 2px solid var(--gray-97);
    background: var(--white);
    color: var(--gray-70);
    font-size: 1rem;
    font-style: normal;
    line-height: 20px; /* 166.667% */
}

input::placeholder {
    color: inherit;
    opacity: 0.6;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance:textfield;
}

button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 100px;
    background-color: var(--white);
    box-shadow: -7px -7px 20px 0px #fff9,
    -4px -4px 5px 0px #fff9,
    7px 7px 20px 0px #0002,
    4px 4px 5px 0px #0001,
    inset 0px 0px 0px 0px #fff9,
    inset 0px 0px 0px 0px #0001,
    inset 0px 0px 0px 0px #fff9,
    inset 0px 0px 0px 0px #0001;
    transition:box-shadow 0.1s cubic-bezier(.79,.21,.06,.81);
    outline: none;
    border: none;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

button[type="submit"] {
    width: auto;
    height: auto;
    padding: 10px 20px;
    border-radius: 15px;
    border: 2px solid var(--gray-97);
    box-shadow: 0px 2px 5px 0px rgba(38, 51, 77, 0.03);
    background: var(--white);
    color: var(--gray-60);
    text-align: center;
    font-size: 1rem;
    font-style: normal;
    line-height: 20px;
}

button:active, button:focus-visible, input:focus-visible, textarea:focus-visible {
    box-shadow: 0px 0px 0px 0px #fff9,
    0px 0px 0px 0px #fff9,
    0px 0px 0px 0px #0001,
    0px 0px 0px 0px #0001,
    inset -7px -7px 20px 0px #fff9,
    inset -4px -4px 5px 0px #fff9,
    inset 7px 7px 20px 0px #0003,
    inset 4px 4px 5px 0px #0001;
}

button:disabled {
    box-shadow: none;
}

input:disabled, button:disabled, textarea:disabled {
    cursor: not-allowed;
}

.sort {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sort-container{
    width: 100%;
    display: flex;
    flex-direction: column;
}

.sort-container {
    margin: 30px 15px;
    flex: 1;
    text-align: center;
    border-radius: 15px;
    background-color: var(--white);
    box-shadow: 0px 2px 5px 0px rgba(38, 51, 77, 0.03);
}

@media(max-width:992px) {
    html {
        font-size: 12px;
    }

    input, textarea {
        padding: 6px 12px;
    }

    button[type="submit"] {
        padding: 6px 12px;
    }

    button {
        width: 30px;
        height: 30px;
        background-size: 80%;
    }
}

@media(max-width:576px) {

    .sort-container {
        margin: 0;
    }
}

.sort-controls {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 3px solid var(--gray-95);
}

.sort-settings {
    display: flex;
    gap: 10px;
}

.sort-settings label {
    display: flex;
    flex-direction: column;
}

input[type="range"] {
    padding-left: 0;
    padding-right: 0;
    border: none;
    background: none;
    box-shadow: none;
}

.sort-chart {
    height: 300px;
    display: grid;
    gap: 2px;
}

.chart-item {
    display: grid;
    grid-template-rows: 1fr 30px;
    gap: 5px;
}

.chart-line {
    display: flex;
    align-items: end;
}

.chart-value {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 15px;
    background-color: black;
    transition: opacity 0.2s ease-out, background-color 0.2s ease-out;
}

.chart-value::before {
    content: "";
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 0px;
    background: linear-gradient(180deg, var(--gray-95) 0%, var(--gray-70) 100%);
    opacity: 0;
    border-radius: 15px;
}

.chart-value.current {
    opacity: 0.3;
}

.chart-value.less {
    background-color: var(--gray-50);
}

.chart-value.blink::before {
    animation: blink 0.5s;
}

.buttons {
    display: flex;
    gap: 10px;
}

.btn-primary.play {
    background-image: url('../img/play.svg');
    background-size: contain;
}

.btn-primary.play.pause {
    background-image: url('../img/pause.svg');
}

.btn-primary.shuffle {
    background-image: url('../img/restart.svg');
    background-size: auto;
}

select {
    padding: 10px 20px;
    margin: 0px;
    outline: none;
    border-radius: 15px;
    border: 2px solid var(--gray-97);
    background: var(--white);
    box-shadow: 0px 2px 5px 0px rgba(38, 51, 77, 0.03);
    color: var(--gray-70);
    font-family: Montserrat;
    font-size: 1rem;
    font-style: normal;
    line-height: 20px;
    transition: box-shadow 0.1s cubic-bezier(.79,.21,.06,.81), opacity 0.1s cubic-bezier(.79,.21,.06,.81);
    -moz-appearance:none;
    -webkit-appearance:none;
    appearance:none;
}

select:focus {
    box-shadow: 0px 0px 0px 0px #fff9,
    0px 0px 0px 0px #fff9,
    0px 0px 0px 0px #0001,
    0px 0px 0px 0px #0001,
    inset -7px -7px 20px 0px #fff9,
    inset -4px -4px 5px 0px #fff9,
    inset 7px 7px 20px 0px #0003,
    inset 4px 4px 5px 0px #0001;
}

.sort-chart {
    padding: 15px;
}

#speed {
    accent-color: currentcolor;
}

@keyframes blink {
    0% {
        height: 0px;
        opacity: 0;
    }
    50% {
        height: 100%;
        bottom: 0px;
        opacity: 1
    }
    100% {
        height: 100%;
        bottom: 100%;
        opacity: 0
    }
}

@media(max-width:992px) {
    select {
        padding: 6px 12px;
    }
}

@media(max-width:768px) {
    .sort-settings {
        flex-wrap: wrap;
    }
}

@media(max-width:576px) {
    .buttons {
        align-self: flex-end;
    }

    .sort-settings {
        gap: 5px;
    }
}

@media(max-width:576px) {
    input, select {
        padding: 3px 10px;
    }

    .sort-settings label {
        text-align: left;
    }
}
